{{ define "head" }}
<meta name="description" content="{{ .Title }} of {{ .Site.Title }}">
<!-- <link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/list.css" media="all"> -->
{{ if .Params.viewer | default true }}
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/gallery.css">
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/viewer/viewer.min.css">
<script src="{{ .Site.Params.staticPath }}/viewer/viewer.min.js"></script>
{{ end }}

{{ end }}

{{ define "title" }}
{{.Title }} | {{ .Site.Title }}
{{ end }}

{{ define "main" }}
<div class="container pt-5" id="list-page">
    <h2 class="text-center pb-2">{{.Title}}</h2>
    <h6 class="text-center">{{ .Params.description | emojify }}</h6>
    <div class="row p-4">
        {{ .Content | emojify }}
    </div>
    <div class="card-group p-4">
        <div class="row justify-content-center">
            {{ range .Params.galleryImages }}
            <div class="col-md-4 p-0 m-0">
                <div class="card p-0 m-0 border-0">
                    <img class="w-100 {{if .Params.viewer | default true}}viewer-enabled-image{{end}}" height="280px" src="{{ .src }}">
                </div>
            </div>
            {{ end }}
        </div>
    </div>
</div>

{{ if .Params.viewer | default true }}
<script>
    document.addEventListener('DOMContentLoaded', function() {
        var viewer = new Viewer(document.getElementById('list-page'), {
            ...{{ .Params.viewerOptions }}
        });
    });
</script>
{{ end }}

{{ end }}